Tips & techniques for Users of Sunsoft Solaris

June 1995

Multiple console windows for Solaris x86

Have you ever wished that you had more than one console to work from? Other UNIX products allow for multiple logins from the console, so why not Solaris? In earlier versions of Solaris, this feature was available. However, with Solaris x86 versions 2.3 and 2.4, this feature seemed to disappear.

Fortunately, you can configure your Solaris x86 system with multiple windows for the main console. In this article, we'll show you how to do this by creating /dev resources and editing your /etc/inittab file.

Getting started

Before we begin, we'd like to emphasize that this configuration is for Solaris x86 only. Don't try to use the information in this article to configure a SPARCstation of any kind.

Whenever you edit important configuration files like the ones in this article, always make a backup prior to editing. In the case of the /etc/inittab file, use the cp command to make a backup file named inittab.bak. To begin configuring your x86 console with multiple windows, log into your system as root and launch OpenWindows.

Creating /dev resources with mknod

Once you've launched OpenWindows as root, click the Console icon twice to open the cmdtool (CONSOLE) window. At the pound sign (#), change directories to /dev. Type the command

# ls -n |pg

to view the files in the /dev directory one page at a time. Press [Enter] until you reach the files starting with v in the file list. Your list should look like the one in Figure A. Press [Enter] until you return to a prompt.

To add two windows or virtual terminals to your x86 console, use the mknod command. This command lets you create a special type of UNIX file. Type the commands

# mknod /dev/vt01 c 100 1
# mknod /dev/vt02 c 100 2

and press [Enter] after each line to create the device specified on the command line. The c variable on each command line denotes a character type of special file that mknod will create.

Now double-check your work by listing the /dev directory. You should see the devices vt01 and vt02 in this directory. Before continuing, use the chmod command

# chmod 777 vt*

to set the file permissions on the devices to rwxrwxrwx.

The number of console windows you can install depends on the amount of memory you've installed on your Solaris 2.4 x86 system. Be conservative at first and start with two additional console windows. If your system is stable, repeat this process and add more console windows one at a time. Now that you've created the virtual terminal resources, you can edit the system inittab file to configure the new console windows.

Adding console windows to /etc/inittab

Launch the Text Editor in OpenWindows and open the /etc/inittab file. Your inittab file should look like the one in Figure B. At the end of the file, add the two lines shown in Figure C. Let's take a look at the new inittab entry in detail.

Each line in the /etc/inittab file represents a process that init controls. Colons separate the inittab entries into fields. The first field represents a unique ID name for the process defined in the entry. The next field, 234, represents the run level for the process in this entry. While the system is in run level 2, 3, or 4, inittab allows the two new processes to exist.

The action field is the next in our new console window entry. The field, set to respawn, starts the process when the run level reaches the appropriate number. If the process dies, respawn will restart the process and continue scanning the inittab file.

The next field is the process /usr/lib/saf/ttymon. This is the port monitor that opens the new console terminals vt01 and vt02. The rest of this entry contains variables for the /usr/lib/saf/ttymon process. You can customize your new console windows by changing the portion of the new entries in double quotes. This will be the login prompt for each new window.

Now that you've completed editing the inittab file, you can save it and exit OpenWindows. To activate your new console windows, reboot your system.

Switching between console windows

When the system reboots, you should return to a normal system login prompt. To switch to the first new virtual window, press the [Alt][PrintScreen][F1] keys. You should then see the login

VT1 Login:

console window. You can switch to the second console window by pressing [Alt][PrintScreen][F2]. When you do, you'll see

VT2 Login:

in the console window. To return to your original console window, press [Alt][PrintScreen][P] to cycle back through your previous sessions in each window. You can use the key sequence [Alt][PrintScreen][N] to cycle ahead through the next available window session.

Conclusion

In this article, we've shown you how to create and enable multiple console windows on your Solaris x86 2.4 system. We've also demonstrated how to maneuver between the new console windows.


[Return to Index for Inside Solaris - June Issue]

Copyright (c) 1995 The Cobb Group, a division of Ziff-Davis Publishing Company. All rights reserved.

Reproduction in whole or in part in any form or medium without express written permission of Ziff-Davis

Publishing Company is prohibited. The Cobb Group and The Cobb Group logo are trademarks of

Ziff-Davis Publishing Company.

Inside Solaris is a publication of The Cobb Group.
1-800-223-8720